---@class Battle.BuffEffect10012002:Battle.BuffEffectBase
---对转移后的伤害减免
local BuffEffect10012002 = Battle.CreateClass("BuffEffect10012002",Battle.BuffEffectBase)
Battle.BuffEffect10012002 = BuffEffect10012002
function BuffEffect10012002:OnCreate(buff)
    ---@type Battle.Buffer
    self.buff = buff
    ---@type Battle.Entity
    self.actor = Battle.ActorManager.GetActor(self.buff.targetId);
    local param = decodeJsonStrToTable(buff.cfg.f_EffectParameter);
    self.per = param[1][1]/10000;
end

---buff生效时
function BuffEffect10012002:OnBuffStart(...)
    local param = { ... };
    ---@type  Battle.DamageData
    local data = param[1]
    if (data == nil or not data.isTransferDamage) then
        return
    end
    data.damage = data.damage * (1-self.per)
end
return BuffEffect10012002